import re
test = '用户输入的字符串1'
if re.match(r'\d', test):
    print('ok')
    print(re.match(r'\d', test))
else:
    print('failed')